<?php $theme = "front"; ?>
<div class="blog">
    <div class="container">
        <div class="blog-top">
            <div class="col-md-9 blog-left">
                <div class="blog-main">
                    <a href="#" class="bg"><?php echo $info['goods_name'] ?></a>
                    <div class="blog-comments">
                        <p><?php echo $info['goods_keywords'] ?></p>
                        <div class="clearfix"></div>
                    </div>
                </div>
                <div class="blog-main-one">
                    <div class="blog-one">
                        <?php if ($info['goods_image']): ?>
                            <img src="<?php echo image($info['goods_image'], $theme); ?>" />
                        <?php endif; ?>
                        <p><p><?php echo $info['goods_body'] ?></p></p>
                    </div>	
                </div>
            </div>

            <div class="col-md-3 blog-right">
                <?php
                $fields = array('gc_id', 'gc_name');
                $search['attributes']['gc_parent_id'] = 0;
                $classInfo = $this->goods_class_model->get_appoint_values($fields, null, $search);
                foreach ($classInfo as $ck => $cv) {
                    echo '<div class="categories">';
                    echo '<h3>' . $cv['gc_name'] . '</h3>';
                    echo '<ul>';
                    $search['attributes']['gc_parent_id'] = $cv['gc_id'];
                    $childInfo = $this->goods_class_model->get_appoint_values($fields, null, $search);
                    foreach ($childInfo as $key => $value) {
                        echo '<li><a href = "' . base_url($this->_site_path . '/goods/index/' . $value['gc_id']) . '">' . $value['gc_name'] . '</a></li>';
                    }
                    echo '</ul>';
                    echo '</div>';
                }
                ?>
            </div>

            <div class="clearfix"></div>
        </div>
        <div class="pagination">
            <nav>
                <ul class="pager">
                    <ul class="pager">

                        <?php if ($pre): ?>
                            <li><a href="<?php echo base_url($this->_site_path . '/goods/single/' . $pre['goods_id']) ?>">上一条</a></li>
                        <?php endif; ?>
                        <?php if ($next): ?>
                            <li><a href="<?php echo base_url($this->_site_path . '/goods/single/' . $next['goods_id']) ?>">下一条</a></li>
                        <?php endif; ?>
                    </ul>
                </ul>
            </nav>
        </div>
    </div>
</div>